package com.yyl.render.ui

import android.content.Context
import android.util.AttributeSet
import com.yyl.render.R
import com.yyl.render.egl.EGLSurfaceView
import com.yyl.render.render.BaseRender
import com.yyl.render.render.RGBARender
import com.yyl.render.render.SimpleRender
import com.yyl.render.render.YYLRender

class SimpleSurfaceView(context: Context, attrs: AttributeSet?) : EGLSurfaceView(context, attrs) {
    lateinit var baseRender: BaseRender

    fun attachRender(baseRender: BaseRender){
        this.baseRender=baseRender
        baseRender.attachSurface(this)
    }

    fun onDestroy() {
        baseRender.onDestroy()
    }
}